package com.zjmzxfzhl.modules.purchase.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zjmzxfzhl.common.base.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 【】实体类
 *
 * @author 庄金明
 */
@Getter
@Setter
@TableName("T_PURCHASE_ORDER_DETAIL")
public class PurchaseOrderDetail extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 采购单ID
     */
    @NotNull
    private Long orderId;

    private Long indentId;

    /**
     * 供应商ID
     */
    @NotNull
    private Long supplierId;

    /**
     * 物料ID
     */
    @NotNull
    private Long materialId;

    /**
     * 数量
     */
    @NotNull
    @DecimalMax("999999999.99")
    private BigDecimal materialNum;


    private Long projectId;

    /**
     * 备注
     */
    private String comment;

}
